home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000141_icon-group-sender _Tue Jun 18 16:48:11 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 18 Jun 1996 16:20:23 MST
  2. Date: Tue, 18 Jun 96 16:48:11 CDT
  3. From: yak@comm.mot.com (Yarko Tymciurak)
  4. Message-Id: <9606182148.AA03199@platov8>
  5. To: H.Lawson@tees.ac.uk, icon-group@cs.arizona.edu
  6. Subject: Re: Locking files
  7. Errors-To: icon-group-errors@cs.arizona.edu
  8. Status: O
  9.  
  10. | Date: Tue, 18 Jun 1996 13:11:43 +0100
  11. | From: Hamish Lawson <H.Lawson@tees.ac.uk>
  12. | To: icon-group@cs.arizona.edu
  13. | Subject: Re: Locking files
  14. | Jerzy Karczmarczuk wrote:
  15. | > there is a cheap way of locking something
  16. | > globally used for ages: the *creation* of a special "lock" file
  17. | > just before entering the critical section (if it is absent,
  18. | > otherwise sleep/wait), and the destruction after.
  19. | Is there not a small risk that in the time between some process finding 
  20. | that the lock file doesn't exist and creating this file, another process 
  21. | might also find that the lock file doesn't exist, thereby breaking the 
  22. | exclusivity mechanism.
  23.  
  24.     The lock "file" without this problem on UNIX is a directory -
  25.     its creation is guarenteed to be autonomous.
  26. | | Hamish Lawson, School of Computing and Mathematics, 
  27. | | University of Teesside, Middlesbrough, Cleveland, UK, TS1 3BA 
  28. | | Tel: +44 1642 212695  Fax: +44 1642 342604
  29. | | E-mail: H.Lawson@tees.ac.uk
  30.  
  31. Yarko Tymciurak
  32. Motorola
  33. iDEN Group
  34.